package com.ruoyi.common.core.constant;

/**
 * @author llcui
 * @date 2022/6/24
 */
public enum HttpStatusEnum {
    SUCCESS_CODE(200, "操作成功"),
    SERVER_ERROR_CODE(500, "系统繁忙,请稍后再试"),
    NOT_LOGIN(401, "登录已失效"),
    APPID_NOT_NULL(301, "appId不能为空"),
    TIMESTAMP_NOT_LEGAL(301, "时间戳不合法"),
    SIGN_ERROR(301, "签名验证未通过"),
    NONCE_EMPTY(301, "唯一ID不能为空"),
    PARAM_VALIDATE_ERROR(400, "参数校检错误"),
    NOT_ACCEPTABLE(406, "禁止操作"),
    NOT_SEND_CODE(407, "发送验证码接口调用失败"),
    SERVICE_REMOTE_INVOKE_ERROR_CODE(503, "系统繁忙,请稍后再试"),
    PER_VARLID_ERROR(504, "权限验证失败"),
    IP_INTERCEPT_ERROR(505, "操作过于频繁,请稍后再试"),
    AIPATH_INTERCEPT_ERROR(506, "暂不允许访问"),
    ILLEGALWORD_INTERCEPT_ERROR(507, "输入可能涉及不符合相关法律法规和政策的内容"),
    LOGIN_TIP_ERROR(508, "LOGIN_TIPS"),

    //业务状态码
    DATA_NOT_EXIST(201, "数据库不存在该数据"),
    ;

    public void setStatus(Integer status) {
        this.status = status;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    private Integer status;
    private String msg;

    HttpStatusEnum(Integer status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public Integer getStatus() {
        return status;
    }

    public String getMsg() {
        return msg;
    }
}
